﻿<%@ Page Title="Trends Archive" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" CodeFile="Archive.aspx.cs" Inherits="Archive" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeaderContentPlaceHoder" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <asp:ListView ID="TrendsArchiveListView" runat="server" DataSourceID="TrendsArchiveXmlDataSource">
        <ItemTemplate>
            <tr style="background-color: #FFFBD6; color: #333333;">
                <td>
                    <asp:HyperLink runat="server" ID="TrendLink" Text='<%# Eval("keyword") %>' NavigateUrl='<%# "~/page.aspx?TrendEx=" + Eval("keyword") %>'></asp:HyperLink>
                </td>
                <td>
                    <asp:Label ID="firstseenLabel" runat="server" Text='<%# Eval("firstseen") %>' />
                </td>
                <td>
                    <asp:Label ID="lastseenLabel" runat="server" Text='<%# Eval("lastseen") %>' />
                </td>
                <td>
                    <asp:Label ID="timesseenLabel" runat="server" Text='<%# Eval("timesseen") %>' />
                </td>
            </tr>
        </ItemTemplate>
        <EmptyDataTemplate>
            <table runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                border-color: #999999; border-style: none; border-width: 1px;">
                <tr>
                    <td>
                        No data was returned.
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
        <LayoutTemplate>
            <table runat="server">
                <tr runat="server">
                    <td runat="server">
                        <table id="itemPlaceholderContainer" runat="server" border="1" style="background-color: #FFFFFF;
                            border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
                            font-family: Verdana, Arial, Helvetica, sans-serif;">
                            <tr runat="server" style="background-color: #FFFBD6; color: #333333;">
                                <th runat="server">
                                    Keyword:
                                </th>
                                <th runat="server">
                                    First Popular On:
                                </th>
                                <th runat="server">
                                    Last Popular On:
                                </th>
                                <th runat="server">
                                    Times Popular:
                                </th>
                            </tr>
                            <tr id="itemPlaceholder" runat="server">
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr runat="server">
                    <td runat="server" style="text-align: center; background-color: #FFCC66; font-family: Verdana, Arial, Helvetica, sans-serif;
                        color: #333333;">
                        <asp:DataPager ID="TrendsDataPager" QueryStringField="page" PageSize="50" PagedControlID="TrendsArchiveListView"
                            runat="server">
                            <Fields>
                                <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                                <asp:NumericPagerField />
                                <asp:NextPreviousPagerField ButtonType="Button" ShowLastPageButton="True" ShowNextPageButton="False"
                                    ShowPreviousPageButton="False" />
                            </Fields>
                        </asp:DataPager>
                    </td>
                </tr>
            </table>
        </LayoutTemplate>
    </asp:ListView>
    <asp:XmlDataSource ID="TrendsArchiveXmlDataSource" runat="server" DataFile="~/TrendWords.xml"
        XPath="googletrends/trend" TransformFile="~/TrendsTransform.xslt"></asp:XmlDataSource>
</asp:Content>
